package org.flashamaphone.tones
{
	import flash.utils.ByteArray;
	
	import org.flashamaphone.voices.IVoice;
	
	/**
	 * Interface for any tone
	 */
	public interface ITone
	{
		/**
		 * debug getter
		 * 
		 * @return debug
		 */
		function get debug():Boolean;
		
		/**
		 * debug setter
		 * 
		 * @param value
		 */
		function set debug(value:Boolean):void;
		
		/**
		 * bytes getter for tone
		 * 
		 * @return byte array
		 */
		function get bytes():ByteArray;
		
		/**
		 * voice getter
		 * 
		 * @return voice
		 */
		function get voice():IVoice;
		
		/**
		 * frequency getter
		 * 
		 * @return frequency
		 */
		function get frequency():Number;
		
		/**
		 * frequency setter
		 * 
		 * @param frequency
		 */
		function set frequency(value:Number):void;
		
		/**
		 * frequency duration
		 * 
		 * @return duration
		 */
		function get duration():Number;
		
		/**
		 * frequency duration
		 * 
		 * @param duration
		 */
		function set duration(value:Number):void;
		
		/**
		 * voice setter
		 * 
		 * @param voice
		 */
		function set voice(value:IVoice):void;
		
		/** 
		 * get attack bytes
		 * 
		 * @return bytearray
		 */
		function get attack():ByteArray;
		
		/** 
		 * get attack duration
		 * 
		 * @return duration
		 */
		function get attackDuration():int;
		
		/** 
		 * set attack duration
		 * 
		 * @param duration
		 */
		function set attackDuration(value:int):void;
		
		/** 
		 * get decay bytes
		 * 
		 * @return bytearray
		 */
		function get decay():ByteArray;
		
		/** 
		 * get decay duration
		 * 
		 * @return duration
		 */
		function get decayDuration():int;
		
		/** 
		 * set decay duration
		 * 
		 * @param duration
		 */
		function set decayDuration(value:int):void;
		
		/** 
		 * get sustain bytes
		 * 
		 * @return bytearray
		 */
		function get sustain():ByteArray;
		
		/** 
		 * get release bytes
		 * 
		 * @return bytearray
		 */
		function get release():ByteArray;
		
		/** 
		 * get release duration
		 * 
		 * @return duration
		 */
		function get releaseDuration():int;
		
		/** 
		 * set release duration
		 * 
		 * @param duration
		 */
		function set releaseDuration(value:int):void;
		
		/**
		 * get live bytestream x bytes at a time depending on phase
		 * 
		 * @param number of bytes to get
		 * @return bytes
		 */
		function stream(numBytes:int):ByteArray;
		
		/**
		 * reset byte stream of this note
		 */
		function resetByteStream():void;
		
		/**
		 * phase getter
		 * 
		 * @return phase
		 */
		function get phase():String;
		
		/**
		 * phase setter
		 * 
		 * @param phase
		 */
		function set phase(value:String):void;
		
		/**
		 * clone
		 * 
		 * @return toned clone
		 */
		function clone():ITone;
	}
}